#define  _CRT_SECURE_NO_WARNINGS 1
#define num (2)
int* masterMind(char* solution, char* guess, int* returnSize) {
    int arr[num] = { 0 };
    for (int i = 0; i < num; i++) {
        arr[i] = 0;
    }
    for (int i = 0; i < 4; i++) {
        if (solution[i] == guess[i]) {
            arr[0]++;
            guess[i] = '0';
            solution[i] = '1';
        }
    }
    for (int i = 0; i < 4; i++) {
        for (int j = 0; j < 4; j++) {
            if (solution[i] == guess[j]) {
                arr[1]++;
                guess[j] = '0';
                break;
            }
        }
    }
    *returnSize = 2;
    return arr;
}

int* twoSum(int* numbers, int numbersLen, int target, int* returnSize) {
    // write code here
    *returnSize = 2;
    static int arr[2] = { 0 };
    memset(arr, 0x00, sizeof(arr));
    for (int i = 0; i < numbersLen; i++) {
        for (int j = i + 1; j < numbersLen; j++) {
            if (numbers[i] + numbers[j] == target) {
                arr[0] = i + 1;
                arr[1] = j + 1;
                return  arr;
            }
        }
    }
    *returnSize = 0;
    return NULL;
}